Skip to content

fix(chemistry): restore the return in manifest_overview - #893

Merged
jirhiker merged 1 commit into
stagingfrom
fix/manifest-overview-return
Aug 25, 2026
Merged

fix(chemistry): restore the return in manifest_overview#893
jirhiker merged 1 commit into
stagingfrom
fix/manifest-overview-return

Conversation

@jirhiker

Copy link
Copy Markdown
Member

Restores return overview in manifest_overview() (services/chemistry_drive.py).

What happened

Copilot Autofix pushed three commits directly to staging against #892:

Commit Change
b0e27f07 removed the per-file merge block, added a non-dict manifest guard
d0314530 renamed an unused loop variable in cli/cli.py
cbd5a5aa re-added the merge block, deleted return overview

The function then built the overview and returned None, which broke
oco water-chemistry manifest-status and failed two tests on staging:

  • test_manifest_overview_merges_databases
  • test_manifest_overview_separates_corrupt_manifest

both with AttributeError: 'NoneType' object has no attribute 'files' / 'databases'.

On the findings that prompted it

They did not hold against the code as merged in #886 (3f217fce). At that
commit overview.databases.append(db) and the for file_id, entry loop were
already at 8-space indent inside the for db loop — not under the except
and return overview was present at the end. The reported "unreachable block"
and "never returns" conditions did not exist until Autofix created them.

The one lasting improvement from that run is the isinstance(manifest, dict)
guard, which is kept.

Verification

tests/test_chemistry_drive.py 17 passed, tests/test_chemistry_lims.py 30 passed.

Worth a look separately

Autofix committed to staging without a PR, authored as a human. Whatever the
merits of a given suggestion, that path has no review gate — this run made a
working function stop working, and it landed on the branch the 1.3.0 promotion
is cut from.

Copilot Autofix pushed three commits straight to staging against PR #892.
The last of them (cbd5a5a) re-added the per-file merge block but deleted
`return overview`, so manifest_overview() built the overview and returned
None. That broke `oco water-chemistry manifest-status` and failed
test_manifest_overview_merges_databases and
test_manifest_overview_separates_corrupt_manifest.

The findings those commits were answering did not hold against the code as
merged in #886: the merge block was already correctly scoped inside the
`for db` loop, and the non-dict manifest guard was already present. The net
effect of the autofix run was to remove a working return statement.

Restore it. tests/test_chemistry_drive.py (17) and
tests/test_chemistry_lims.py (30) pass.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Coverage

79.30% total — gate is 75%.

Coverage for the Python files changed in this PR
Name Stmts Miss Cover Missing
services/chemistry_drive.py 187 48 74% 78-94, 99-101, 130-158, 163-172, 208, 218-220, 268, 272, 281, 310, 381-399
TOTAL 187 48 74%

@jirhiker
jirhiker merged commit 1a9f30c into staging Aug 25, 2026
9 checks passed
@jirhiker
jirhiker deleted the fix/manifest-overview-return branch August 25, 2026 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant